
#ifndef GTNODE_
#define GTNODE_

#include <string>
#include "symtab.h"

using namespace std;

struct GTNode
{
    int token;
    string name;
    char id[256];
    int lineno;
    union {
        int ivalue;
        float fvalue;
        int dimen;
    };
    int offset;
    string tag;
    string reg;
    string struct_name;
    Type type;
    vector<int>sizes;
    GTNode *child;
    GTNode *sibiling;
};

GTNode *newNode(int token, string name, int num, ...);
void travel(GTNode *head, int indent);

#endif